package facade;

import subsystem.CPU;
import subsystem.HardDrive;
import subsystem.Memory;

// 门面类：ComputerFacade
public class ComputerFacade {
    private CPU cpu;
    private Memory memory;
    private HardDrive hardDrive;

    public ComputerFacade() {
        this.cpu = new CPU();
        this.memory = new Memory();
        this.hardDrive = new HardDrive();
    }

    // 简化的启动方法，隐藏子系统的复杂性
    public void startComputer() {
        System.out.println("计算机启动开始...");
        cpu.start();
        memory.load();
        hardDrive.read();
        cpu.execute();
        System.out.println("计算机启动完成！");
    }
}